package com.xwaiy.xwaiyrpc.fault.tolerant;

import com.xwaiy.xwaiyrpc.model.RpcRequest;
import com.xwaiy.xwaiyrpc.model.RpcResponse;

import java.util.Map;

/**
 * 容错机制
 * @Author Xwaiy
 * @Date 2025/9/3 16:40
 **/
public interface TolerantStrategy {
    /**
     * 容错
     * @param context
     * @param e
     * @return
     */
    RpcResponse doTolerant(Map<String, Object> context, Exception e);
}
